package com.project.service.impl;

import com.project.bean.SpeakBean;
import com.project.dao.ISpeakDao;
import com.project.service.ISpeakService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SpeakServiceImpl implements ISpeakService {
    @Autowired
    private ISpeakDao speakDao;
    @Override
    public List<SpeakBean> addSpeak(SpeakBean speak) {
        speakDao.addSpeak(speak);
        return speakDao.findByProduct(speak.getProduct().getId());
    }
}
